/*
 * Copyright 2025 The JA-SIG Collaborative. All rights reserved. distributed with this file and
 * available online at
 */
package com.lap.auth.domain.msg;

import com.lap.framework.ddd.AggregateRoot;
import lombok.EqualsAndHashCode;
import lombok.Getter;

/**
 * 消息模版领域。
 *
 * @author Shuisheng Lao(劳水生)
 * @version 0.0.1
 */
@EqualsAndHashCode(callSuper = false)
@Getter
public class MsgTemplate extends AggregateRoot {

  private final Integer id;
  private final String code;
  private final Integer module;
  private final String name;
  private final String title;
  private final String content;

  public MsgTemplate(
      Integer id, Integer module, String code, String name, String title, String content) {
    this.id = id;
    this.module = module;
    this.code = code;
    this.name = name;
    this.title = title;
    this.content = content;
  }

  public boolean isNew() {
    return (id == null);
  }
}
